<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>InFact: src/infact/example.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">InFact
   
   </div>
   <div id="projectbrief">Interpreter and factory for easily creating C++ objects at run-time</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Defines</a>  </div>
  <div class="headertitle">
<div class="title">src/infact/example.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides various example class headers.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string&gt;</code><br/>
<code>#include &quot;<a class="el" href="factory_8h_source.html">factory.h</a>&quot;</code><br/>
</div>
<p><a href="example_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_date.html">infact::Date</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">An interface to represent a date.  <a href="classinfact_1_1_date.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_date_impl.html">infact::DateImpl</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">An implementation of the <a class="el" href="classinfact_1_1_date.html" title="An interface to represent a date.">Date</a> interface that can be constructed by a <a class="el" href="classinfact_1_1_factory.html">Factory</a> (because of the <code><a class="el" href="example_8h.html#a9ffdcb7be895354ae6e0b0724b4c40bd" title="The macro by which Date  implementations may register themselves with the Factory  that can construct...">REGISTER_DATE(DateImpl)</a></code> declaration in <code><a class="el" href="example_8cc.html" title="Provides implementations of the various example classes.">example.cc</a></code>).  <a href="classinfact_1_1_date_impl.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_person.html">infact::Person</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">An interface representing a person.  <a href="classinfact_1_1_person.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_person_impl.html">infact::PersonImpl</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A concrete implementation of the <a class="el" href="classinfact_1_1_person.html" title="An interface representing a person.">Person</a> interface that can be constructed by a <a class="el" href="classinfact_1_1_factory.html">Factory</a> (because of the <code><a class="el" href="example_8h.html#a47cd57efd48ac0ef0c8d4dcac5d4aa5a" title="The macro by which Person  implementations may register themselves with the Factory  that can constru...">REGISTER_PERSON(PersonImpl)</a></code> declaration in <code><a class="el" href="example_8cc.html" title="Provides implementations of the various example classes.">example.cc</a></code>).  <a href="classinfact_1_1_person_impl.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_animal.html">infact::Animal</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A very simple class to represent an animal.  <a href="classinfact_1_1_animal.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_cow.html">infact::Cow</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A class to represent a cow.  <a href="classinfact_1_1_cow.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html">infact::Sheep</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A sheep.  <a href="classinfact_1_1_sheep.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_pet_owner.html">infact::PetOwner</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">An owner of a pet.  <a href="classinfact_1_1_pet_owner.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_human_pet_owner.html">infact::HumanPetOwner</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A concrete type of <a class="el" href="classinfact_1_1_pet_owner.html" title="An owner of a pet.">PetOwner</a> that can be constructed by a <a class="el" href="classinfact_1_1_factory.html">Factory</a>&lt;<a class="el" href="classinfact_1_1_pet_owner.html">PetOwner</a>&gt; instance.  <a href="classinfact_1_1_human_pet_owner.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceinfact.html">infact</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>The namespace for the entire InFact library. </p>
<br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="example_8h.html#a9ffdcb7be895354ae6e0b0724b4c40bd">REGISTER_DATE</a>(TYPE)&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,Date)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The macro by which <a class="el" href="classinfact_1_1_date.html">Date </a> implementations may register themselves with the <a class="el" href="classinfact_1_1_factory.html">Factory </a> that can construct <a class="el" href="classinfact_1_1_date.html">Date </a> instances.  <a href="#a9ffdcb7be895354ae6e0b0724b4c40bd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="example_8h.html#a47cd57efd48ac0ef0c8d4dcac5d4aa5a">REGISTER_PERSON</a>(TYPE)&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,Person)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The macro by which <a class="el" href="classinfact_1_1_person.html">Person </a> implementations may register themselves with the <a class="el" href="classinfact_1_1_factory.html">Factory </a> that can construct <a class="el" href="classinfact_1_1_person.html">Person </a> instances.  <a href="#a47cd57efd48ac0ef0c8d4dcac5d4aa5a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="example_8h.html#a8373608da8a006b760cbb66b6205fffe">REGISTER_ANIMAL</a>(TYPE)&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,Animal)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers the <a class="el" href="classinfact_1_1_animal.html">Animal </a> with the specified subtype <code>TYPE</code> and <code>NAME</code> with the <a class="el" href="classinfact_1_1_animal.html">Animal </a> <a class="el" href="classinfact_1_1_factory.html">Factory</a>.  <a href="#a8373608da8a006b760cbb66b6205fffe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="example_8h.html#a9533639d16f8b0269c286444897ff13d">REGISTER_PET_OWNER</a>(TYPE)&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,PetOwner)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The macro by which <a class="el" href="classinfact_1_1_pet_owner.html">PetOwner </a> implementations may register themselves with the <a class="el" href="classinfact_1_1_factory.html">Factory </a> that can construct <a class="el" href="classinfact_1_1_pet_owner.html">PetOwner </a> instances.  <a href="#a9533639d16f8b0269c286444897ff13d"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Provides various example class headers. </p>
<p>Please note the presence of the various <code>REGISTER_*</code> macros sprinkled throughout this file. The convention is for a <code>REGISTER</code>_<em>type</em> macro to be placed just below the declaration of the <em>type</em> interface declaration. </p>
<dl class="author"><dt><b>Author:</b></dt><dd><a href="mailto:dbikel@google.com">dbikel@google.com</a> (Dan Bikel) </dd></dl>

<p>Definition in file <a class="el" href="example_8h_source.html">example.h</a>.</p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="a8373608da8a006b760cbb66b6205fffe"></a><!-- doxytag: member="example.h::REGISTER_ANIMAL" ref="a8373608da8a006b760cbb66b6205fffe" args="(TYPE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="example_8h.html#a8373608da8a006b760cbb66b6205fffe">REGISTER_ANIMAL</a></td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">TYPE</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,Animal)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Registers the <a class="el" href="classinfact_1_1_animal.html">Animal </a> with the specified subtype <code>TYPE</code> and <code>NAME</code> with the <a class="el" href="classinfact_1_1_animal.html">Animal </a> <a class="el" href="classinfact_1_1_factory.html">Factory</a>. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00175">175</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9ffdcb7be895354ae6e0b0724b4c40bd"></a><!-- doxytag: member="example.h::REGISTER_DATE" ref="a9ffdcb7be895354ae6e0b0724b4c40bd" args="(TYPE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="example_8h.html#a9ffdcb7be895354ae6e0b0724b4c40bd">REGISTER_DATE</a></td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">TYPE</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,Date)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The macro by which <a class="el" href="classinfact_1_1_date.html">Date </a> implementations may register themselves with the <a class="el" href="classinfact_1_1_factory.html">Factory </a> that can construct <a class="el" href="classinfact_1_1_date.html">Date </a> instances. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00068">68</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<a class="anchor" id="a47cd57efd48ac0ef0c8d4dcac5d4aa5a"></a><!-- doxytag: member="example.h::REGISTER_PERSON" ref="a47cd57efd48ac0ef0c8d4dcac5d4aa5a" args="(TYPE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="example_8h.html#a47cd57efd48ac0ef0c8d4dcac5d4aa5a">REGISTER_PERSON</a></td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">TYPE</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,Person)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The macro by which <a class="el" href="classinfact_1_1_person.html">Person </a> implementations may register themselves with the <a class="el" href="classinfact_1_1_factory.html">Factory </a> that can construct <a class="el" href="classinfact_1_1_person.html">Person </a> instances. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00122">122</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9533639d16f8b0269c286444897ff13d"></a><!-- doxytag: member="example.h::REGISTER_PET_OWNER" ref="a9533639d16f8b0269c286444897ff13d" args="(TYPE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="example_8h.html#a9533639d16f8b0269c286444897ff13d">REGISTER_PET_OWNER</a></td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">TYPE</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="factory_8h.html#a0b09e4aaef613d7556c07875c7d5a029">REGISTER_NAMED</a>(TYPE,TYPE,PetOwner)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The macro by which <a class="el" href="classinfact_1_1_pet_owner.html">PetOwner </a> implementations may register themselves with the <a class="el" href="classinfact_1_1_factory.html">Factory </a> that can construct <a class="el" href="classinfact_1_1_pet_owner.html">PetOwner </a> instances. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00273">273</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Apr 23 2014 10:07:52 for InFact by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
